load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "rpcclient",
    srcs = [
        "client.go",
        "revoked_cert.go",
    ],
    importpath = "go.f110.dev/heimdallr/pkg/rpc/rpcclient",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/auth/token",
        "//pkg/config/userconfig",
        "//pkg/logger",
        "//pkg/rpc",
        "//vendor/github.com/grpc-ecosystem/go-grpc-middleware/logging/zap",
        "//vendor/go.uber.org/zap",
        "//vendor/golang.org/x/xerrors",
        "//vendor/google.golang.org/grpc",
        "//vendor/google.golang.org/grpc/codes",
        "//vendor/google.golang.org/grpc/connectivity",
        "//vendor/google.golang.org/grpc/keepalive",
        "//vendor/google.golang.org/grpc/metadata",
        "//vendor/google.golang.org/grpc/status",
    ],
)

go_test(
    name = "rpcclient_test",
    srcs = ["client_test.go"],
    embed = [":rpcclient"],
    deps = [
        "//pkg/rpc/rpctestutil",
        "//vendor/github.com/stretchr/testify/assert",
        "//vendor/github.com/stretchr/testify/require",
    ],
)
